package com.kun.service;

import com.kun.mapper.HandleOrderMapper;
import com.kun.pojo.HandleOrder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Version:v1.0
 * @Author: 鲁坤
 * @Date: 2021-04-08
 * @ClassName: HandleOrderImpl
 * @Description: TODO
 */
@Service("HandleOrderService")
public class HandleOrderImpl implements HandleOrderService{
    @Autowired
    private HandleOrderMapper handleOrderMapper;
    @Override
    public int addAnswer(HandleOrder handleOrder) {
        return handleOrderMapper.addAnswer(handleOrder);
    }

    @Override
    @CachePut(value = "handleOrder",key = "#oid")
    public List<HandleOrder> queryAnswerByOid(int oid) {
        return handleOrderMapper.queryAnswerByOid(oid);
    }
}
